<?php
namespace Admin\Controller;
use Common\Controller\AdminController;

class CsbbController extends AdminController{

	public function index(){
        $where = '1=1';
		$where .= I('get.cslb_id') > 0 ? ' and cslb_id=' . I('get.cslb_id', 0, 'intval') : '';
		$where .= I('get.csxm_id') > 0 ? ' and csxm_id=' . I('get.csxm_id', 0, 'intval') : '';		
	    $list = $this->getList('*', 'ssgl_sq', $where, 'id desc', true);
		$this->assign('list', $list);
		$groupList = $this->getList('id,name', 'ssgl_cslb');
		$this->assign('groupList', $groupList);
		$classifyList = $this->getList('id,name', 'ssgl_csxm');
		$this->assign('classifyList', $classifyList);	
		$this->display();
	}
}